package com.igeekhome.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 立以宁
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class newResultBean {

    public static final int SUCCESS_ZERO = 0;
    public static final int SUCCESS_CODE = 200;
    public static final int FAILD_CODE = 500;

    private Integer code;
    private String message;
    private Object data;
    private Status status;


    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }
    public void setData(Object data) {
        this.data = data;
    }

    public newResultBean(Integer code, String message, Object data) {
        super();
        this.code = code;
        this.message = message;
        this.data = data;
    }
    public newResultBean(Status status, Object data) {
        super();
        this.status = status;
        this.data = data;
    }


    public static newResultBean newOk(Status status,Object data) {

        return new newResultBean(status,data);
    }

   
    public static ResultBean build(Integer code, String message, Object data) {
        return new ResultBean(code, message, data);
    }

    @Override
    public String toString() {
        return "ResultBean [status=" + status  + ", data=" + data + "]";
    }





}



	